﻿<UserControl x:Class="MyFinanceManager.PC.ucAddNewFuel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:MyFinanceManager_Objects="clr-namespace:MyFinanceManager.Objects;assembly=MyFinanceManager.PC.Objects" Height="288" MinWidth="192">

    <UserControl.Resources>
        <ObjectDataProvider x:Key="FuelRecordDS" ObjectType="{x:Type MyFinanceManager_Objects:FuelRecord}"/>
    </UserControl.Resources>

    <StackPanel x:Name="LayoutRoot">
        <TextBlock Text="Tankstelle"/>
		<ComboBox x:Name="Stations"  IsSynchronizedWithCurrentItem="True" Text="{Binding Path=Fuelstation, Mode=Default, Source={StaticResource FuelRecordDS}}"/>
		<TextBlock Text="Betrag"/>
	<TextBox x:Name="tbAmount" Text="{Binding Path=Amount, Mode=Default, StringFormat=C, Source={StaticResource FuelRecordDS}}" LostFocus="TextBox_LostFocus" />
		<TextBlock Text="Benzinpreis"/>
		<TextBox x:Name="tbGasprice" Text="{Binding Path=Gasprice, StringFormat=N3, Mode=Default, Source={StaticResource FuelRecordDS}}" LostFocus="TextBox_LostFocus" />
		<TextBlock Text="Benzinmenge"/>
		<TextBox x:Name="tbAmountOfGas" Text="{Binding Path=AmountOfGas,  StringFormat=N2,Mode=Default, Source={StaticResource FuelRecordDS}}" IsEnabled="False" />
		<TextBlock Text="Kilometerstand"/>
		<TextBox Text="{Binding Path=Mileage, Mode=Default, StringFormat=000000, Source={StaticResource FuelRecordDS}}" />
			<TextBlock Text="Datum &amp; Uhrzeit"/>
		<TextBox Text="{Binding Path=Time, Mode=Default, Source={StaticResource FuelRecordDS}}" />
		</StackPanel>
</UserControl>